
// Hide a DIV
function hideDiv(divId) {
    if (document.layers) { document.layers[divId].visibility = 'hide'; }
    else if (document.all) { document.all[divId].style.visibility = 'hidden'; }
    else if (document.getElementById) { document.getElementById(divId).style.visibility = 'hidden'; }
}

// Show a DIV
function showDiv(divId) {
    showDivByDoc(divId, document);
}
function showDivByDoc(divId, doc) {
    if (doc.layers) { doc.layers[divId].visibility = 'show'; }
    else if (doc.all) { doc.all[divId].style.visibility = 'visible'; }
    else if (doc.getElementById) { doc.getElementById(divId).style.visibility = 'visible'; }
}

// Remove a DOM node by ID
function removeNodeById(nodeId) {
	node = document.getElementById(nodeId);
	if (node) {
		if (node.parentNode) {
			node.parentNode.removeChild(node);
		}
	}
}
